Ext.onReady(function(){
	Ext.MessageBox
			.confirm(
					"确认备份",
					"确认备份数据库",
					function(button) {
						if (button == "yes") {
							Ext.Ajax
							.request( {
								url : '/schedule/MysqlBak',
								params : {
									"filepath" :'D:\\SQL(数据库备份文件删除请谨慎).bak',
									"username" :"root",
									"password" :"admin",
									"ip" :"localhost",
									"databaseName" :"schedule"
								},
								method : 'POST',
								success : function(action) {
									Ext.Msg.alert("系统消息",'恭喜您，备份成功');
								},
								failure : function(action) {
									Ext.Msg.alert('系统消息','备份失败，服务器错误，请联系管理员');
								},
								scope : this
							})
						}
						else{
							window.parent.frames['mainFrame'].location.reload('mainFrame.jsp');
						}
					}, this);

});